package com.lzq.Test;

import com.lzq.FactoryPattern.Factory_Simple;
import com.lzq.FactoryPattern.Factory_method;
import com.lzq.SingletonPattern.Singleton;
import com.lzq.SingletonPattern.Singleton_Enum;
import com.lzq.SingletonPattern.Singleton_Inner;
import org.junit.Test;

public class test {
    public static void main(String[] args){
        /*Singleton_EHan singleton = Singleton_EHan.getInstance();
        Singleton_EHan singleton02 = Singleton_EHan.getInstance();*/

        /*Singleton_LanHan singleton_lanHan = Singleton_LanHan.getInstance();
        Singleton_LanHan singleton_lanHan1 = Singleton_LanHan.getInstance();
        System.out.println(singleton_lanHan == singleton_lanHan1);*/

        Singleton singleton = Singleton.getINSTANCE();
        Singleton singleton1 = Singleton.getINSTANCE();
        System.out.println(singleton == singleton1);

        Singleton_Inner singleton_inner = Singleton_Inner.getInstance();
        Singleton_Inner singleton_inner1 = Singleton_Inner.getInstance();
        System.out.println(singleton_inner == singleton_inner1);

        Singleton_Enum singleton_enum = Singleton_Enum.getInstance();
        Singleton_Enum singleton_enum1 = Singleton_Enum.getInstance();
        System.out.println(singleton_enum == singleton_enum1);
    }
    @Test
    public void Factory_Simple(){
        Factory_Simple.SimpleFactory.makeProduct(1).show();
        Factory_Simple.SimpleFactory.makeProduct(0).show();
    }
    @Test
    public void Factory_method(){
        //Factory_method.Factory01

    }
}